<!DOCTYPE html>
<html lang="en">
<head>
<title>SChannel helper: SChannel.IcsWSocket: Class TSChannelWSocket</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<div class="container"><div class="navigation">
<h2><a href="index.html">SChannel helper</a></h2><ul><li><a href="AllUnits.html">Units</a></li><li><a href="ClassHierarchy.html">Class Hierarchy</a></li><li><a href="AllClasses.html">Classes, Interfaces, Objects and Records</a></li><li><a href="AllTypes.html">Types</a></li><li><a href="AllVariables.html">Variables</a></li><li><a href="AllConstants.html">Constants</a></li><li><a href="AllFunctions.html">Functions and Procedures</a></li><li><a href="AllIdentifiers.html">Identifiers</a></li></ul></div><div class="content">
<span id="TSChannelWSocket"></span><h1 class="cio">Class TSChannelWSocket</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section">Fields</div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section"><a class="section" href="#PasDoc-Properties">Properties</a></div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="SChannel.IcsWSocket.html">SChannel.IcsWSocket</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TSChannelWSocket = class(TWSocket)</code></p>
<h2 class="description">Description</h2>
<p>
ICS TWSocket descendant supporting TLS</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TWSocket</li>
<li class="thisitem">TSChannelWSocket</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#Create">Create</a></strong>(AOwner : TComponent); override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#Destroy">Destroy</a></strong>; override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#Listen">Listen</a></strong>; override;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#Shutdown">Shutdown</a></strong>(How : Integer); override;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>procedure <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#PostFD_EVENT">PostFD_EVENT</a></strong>(Event: Cardinal);</code></td>
</tr>
</table>
<span id="PasDoc-Properties"></span><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#Secure">Secure</a></strong>: Boolean read FSecure write SetSecure;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#PayloadReadCount">PayloadReadCount</a></strong>: Int64 read FPayloadReadCount;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#PayloadWriteCount">PayloadWriteCount</a></strong>: Int64 read FPayloadWriteCount;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#SessionData">SessionData</a></strong>: <a href="SChannel.Utils.TSessionData.html">TSessionData</a> read FSessionData write SetSessionData;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#OnTLSDone">OnTLSDone</a></strong>: TNotifyEvent read FOnTLSDone write FOnTLSDone;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><code>property <strong><a href="SChannel.IcsWSocket.TSChannelWSocket.html#OnTLSShutdown">OnTLSShutdown</a></strong>: TNotifyEvent read FOnTLSShutdown write FOnTLSShutdown;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Create"></span><code>constructor <strong>Create</strong>(AOwner : TComponent); override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Destroy"></span><code>destructor <strong>Destroy</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
&nbsp;</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Listen"></span><code>procedure <strong>Listen</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Override for inherited method - deny listening in secure mode</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Shutdown"></span><code>procedure <strong>Shutdown</strong>(How : Integer); override;</code></td>
</tr>
<tr><td colspan="2">
<p>
Override for inherited method - shutdown TLS channel before closing the connection (ignoring exceptions and don't waiting for peer response)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="PostFD_EVENT"></span><code>procedure <strong>PostFD_EVENT</strong>(Event: Cardinal);</code></td>
</tr>
<tr><td colspan="2">
<p>
Imitate FD_* event on a socket. Mostly useful with FD_READ to have DataAvailable with buffering socket implementations</p>
</td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="Secure"></span><code>property <strong>Secure</strong>: Boolean read FSecure write SetSecure;</code></td>
</tr>
<tr><td colspan="2">
<p>
Indicates whether TLS is currently used. Effect of setting the property depends on current state. <br> Socket is <strong>not</strong> connected: </p>

<ul class="paragraph_spacing">
  <li><p>Setting <code>Secure</code> to <code>True</code>: TLS handshake will be established automatically as soon as socket is connected.</p></li>
  <li><p>Setting <code>Secure</code> to <code>False</code>: work as usual (no TLS)</p></li>
</ul>

<p> Socket <strong>is</strong> connected: </p>

<ul class="paragraph_spacing">
  <li><p>Setting <code>Secure</code> to <code>True</code>: TLS handshake will be started immediately over existing connection</p></li>
  <li><p>Setting <code>Secure</code> to <code>False</code>: TLS shutdown will be executed immediately without closing the connection</p></li>
</ul>

<p></p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="PayloadReadCount"></span><code>property <strong>PayloadReadCount</strong>: Int64 read FPayloadReadCount;</code></td>
</tr>
<tr><td colspan="2">
<p>
Traffic counter for incoming payload. <code>TWSocket.ReadCount</code> property reflects encrypted traffic</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="PayloadWriteCount"></span><code>property <strong>PayloadWriteCount</strong>: Int64 read FPayloadWriteCount;</code></td>
</tr>
<tr><td colspan="2">
<p>
Traffic counter for outgoing payload. <code>TWSocket.WriteCount</code> property reflects encrypted traffic</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="SessionData"></span><code>property <strong>SessionData</strong>: <a href="SChannel.Utils.TSessionData.html">TSessionData</a> read FSessionData write SetSessionData;</code></td>
</tr>
<tr><td colspan="2">
<p>
TLS Session data that allows fine tuning of TLS handshake. Also it could contain shared credentials used by multiple sockets. Fields must be assigned before starting TLS handshake (otherwise exception is raised). Note that some fields are assigned internally based on other values (f.ex., <code><a class="normal" href="SChannel.Utils.html#sfNoServerVerify">sfNoServerVerify</a></code> flag is enabled if connecting to IP). Initial values are returned when secure connection is finished. ! Session data is finalized in destructor, closing and zeroing any non-shared handles.</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="OnTLSDone"></span><code>property <strong>OnTLSDone</strong>: TNotifyEvent read FOnTLSDone write FOnTLSDone;</code></td>
</tr>
<tr><td colspan="2">
<p>
Event is called when TLS handshake is established successfully</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="published.gif" alt="Published" title="Published"></a></td>
<td class="itemcode"><span id="OnTLSShutdown"></span><code>property <strong>OnTLSShutdown</strong>: TNotifyEvent read FOnTLSShutdown write FOnTLSShutdown;</code></td>
</tr>
<tr><td colspan="2">
<p>
Event is called when TLS handshake is shut down</p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0</a>. </em>
</span>
</div></div></body></html>
